<!DOCTYPE html>
{% load static %}

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    {% block title %}
    <title>Home Page</title>
    {% endblock %}
    
    <!-- FAVICON -->
    <link rel="icon" href="{% static 'erp_core/img/favicon.ico' %}">

    <!-- CUSTOM CSS -->
    <link rel="stylesheet" href="{% static 'erp_core/css/stylesheet.css' %}">

    <!-- BOOTSTRAP CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
 
    <!-- FONT AWESOME -->
    <script src="https://kit.fontawesome.com/d721e6a14c.js" crossorigin="anonymous"></script>

</head>
<body>

    <nav class="navbar navbar-expand-lg navbar-light bg-info">
        <a class="navbar-brand text-light m-4" href="{% url 'erp_core:home' %}">
            <h2><i class="fa-solid fa-meteor"></i>&nbsp;</i>sERPent</h2>
            <h6 class="text-light small">Python ERP prototype </h6>
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="" role="button" ><i class="fa fa-bars" aria-hidden="true" style="color:#ffffff"></i></span>
        </button>
        </button>
    
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:company_create' %}">+New Co</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:invoice_create' %}">+New Inv</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:payment_create' %}">+New Pay</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:product_create' %}">+New Prod</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:filtered_view' %}">Pre-Made Filters</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-light" href="{% url 'erp_core:feature' %}">Alpha Feats</a>
                </li>
            </ul>

            {% if user.is_authenticated %}
                <ul class="navbar-nav ms-auto">
                    <div class="dropdown">
                        <a class="btn btn-info text-light dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
                        Welcome, {{ user.username }}
                        </a>
                    
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                        <li><a class="dropdown-item" href="/help/">Help</a></li>
                        <li><a class="dropdown-item" href="/admin/">Admin Panel</a></li>
                        <li><a class="dropdown-item" href="/api/v1/">Web APIs</a></li>
                        <li><a class="dropdown-item" href="/logout/">Logout</a></li>
                        </ul>
                    </div>
                </ul>
            {% endif %}
        </div>
    </nav> 

    {% block content %}
    {% endblock %}
    
</body>
</html>
